/*
*
* SysAuthorityExample.java
* Copyright(C) 2017-2020 fendo公司
* @date 2018-05-27
*/
package com.mass.core.sys.authority.model;

import java.util.ArrayList;
import java.util.List;

public class SysAuthorityExample {
    /**
     * t_sys_authority
     */
    protected String orderByClause;

    /**
     * t_sys_authority
     */
    protected boolean distinct;

    /**
     * t_sys_authority
     */
    protected List<Criteria> oredCriteria;

    /**
     *
     * @mbg.generated
     */
    public SysAuthorityExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    /**
     *
     * @mbg.generated
     */
    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    /**
     *
     * @mbg.generated
     */
    public String getOrderByClause() {
        return orderByClause;
    }

    /**
     *
     * @mbg.generated
     */
    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    /**
     *
     * @mbg.generated
     */
    public boolean isDistinct() {
        return distinct;
    }

    /**
     *
     * @mbg.generated
     */
    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    /**
     *
     * @mbg.generated
     */
    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    /**
     *
     * @mbg.generated
     */
    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    /**
     *
     * @mbg.generated
     */
    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    /**
     *
     * @mbg.generated
     */
    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    /**
     *
     * @mbg.generated
     */
    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    /**
     * t_sys_authority null
     */
    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andIdIsNull() {
            addCriterion("ID is null");
            return (Criteria) this;
        }

        public Criteria andIdIsNotNull() {
            addCriterion("ID is not null");
            return (Criteria) this;
        }

        public Criteria andIdEqualTo(Long value) {
            addCriterion("ID =", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotEqualTo(Long value) {
            addCriterion("ID <>", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThan(Long value) {
            addCriterion("ID >", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThanOrEqualTo(Long value) {
            addCriterion("ID >=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThan(Long value) {
            addCriterion("ID <", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThanOrEqualTo(Long value) {
            addCriterion("ID <=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdIn(List<Long> values) {
            addCriterion("ID in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotIn(List<Long> values) {
            addCriterion("ID not in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdBetween(Long value1, Long value2) {
            addCriterion("ID between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotBetween(Long value1, Long value2) {
            addCriterion("ID not between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andRoleOrUserIdIsNull() {
            addCriterion("ROLE_OR_USER_ID is null");
            return (Criteria) this;
        }

        public Criteria andRoleOrUserIdIsNotNull() {
            addCriterion("ROLE_OR_USER_ID is not null");
            return (Criteria) this;
        }

        public Criteria andRoleOrUserIdEqualTo(Long value) {
            addCriterion("ROLE_OR_USER_ID =", value, "roleOrUserId");
            return (Criteria) this;
        }

        public Criteria andRoleOrUserIdNotEqualTo(Long value) {
            addCriterion("ROLE_OR_USER_ID <>", value, "roleOrUserId");
            return (Criteria) this;
        }

        public Criteria andRoleOrUserIdGreaterThan(Long value) {
            addCriterion("ROLE_OR_USER_ID >", value, "roleOrUserId");
            return (Criteria) this;
        }

        public Criteria andRoleOrUserIdGreaterThanOrEqualTo(Long value) {
            addCriterion("ROLE_OR_USER_ID >=", value, "roleOrUserId");
            return (Criteria) this;
        }

        public Criteria andRoleOrUserIdLessThan(Long value) {
            addCriterion("ROLE_OR_USER_ID <", value, "roleOrUserId");
            return (Criteria) this;
        }

        public Criteria andRoleOrUserIdLessThanOrEqualTo(Long value) {
            addCriterion("ROLE_OR_USER_ID <=", value, "roleOrUserId");
            return (Criteria) this;
        }

        public Criteria andRoleOrUserIdIn(List<Long> values) {
            addCriterion("ROLE_OR_USER_ID in", values, "roleOrUserId");
            return (Criteria) this;
        }

        public Criteria andRoleOrUserIdNotIn(List<Long> values) {
            addCriterion("ROLE_OR_USER_ID not in", values, "roleOrUserId");
            return (Criteria) this;
        }

        public Criteria andRoleOrUserIdBetween(Long value1, Long value2) {
            addCriterion("ROLE_OR_USER_ID between", value1, value2, "roleOrUserId");
            return (Criteria) this;
        }

        public Criteria andRoleOrUserIdNotBetween(Long value1, Long value2) {
            addCriterion("ROLE_OR_USER_ID not between", value1, value2, "roleOrUserId");
            return (Criteria) this;
        }

        public Criteria andMenuIdIsNull() {
            addCriterion("MENU_ID is null");
            return (Criteria) this;
        }

        public Criteria andMenuIdIsNotNull() {
            addCriterion("MENU_ID is not null");
            return (Criteria) this;
        }

        public Criteria andMenuIdEqualTo(Long value) {
            addCriterion("MENU_ID =", value, "menuId");
            return (Criteria) this;
        }

        public Criteria andMenuIdNotEqualTo(Long value) {
            addCriterion("MENU_ID <>", value, "menuId");
            return (Criteria) this;
        }

        public Criteria andMenuIdGreaterThan(Long value) {
            addCriterion("MENU_ID >", value, "menuId");
            return (Criteria) this;
        }

        public Criteria andMenuIdGreaterThanOrEqualTo(Long value) {
            addCriterion("MENU_ID >=", value, "menuId");
            return (Criteria) this;
        }

        public Criteria andMenuIdLessThan(Long value) {
            addCriterion("MENU_ID <", value, "menuId");
            return (Criteria) this;
        }

        public Criteria andMenuIdLessThanOrEqualTo(Long value) {
            addCriterion("MENU_ID <=", value, "menuId");
            return (Criteria) this;
        }

        public Criteria andMenuIdIn(List<Long> values) {
            addCriterion("MENU_ID in", values, "menuId");
            return (Criteria) this;
        }

        public Criteria andMenuIdNotIn(List<Long> values) {
            addCriterion("MENU_ID not in", values, "menuId");
            return (Criteria) this;
        }

        public Criteria andMenuIdBetween(Long value1, Long value2) {
            addCriterion("MENU_ID between", value1, value2, "menuId");
            return (Criteria) this;
        }

        public Criteria andMenuIdNotBetween(Long value1, Long value2) {
            addCriterion("MENU_ID not between", value1, value2, "menuId");
            return (Criteria) this;
        }

        public Criteria andMetadataIdIsNull() {
            addCriterion("METADATA_ID is null");
            return (Criteria) this;
        }

        public Criteria andMetadataIdIsNotNull() {
            addCriterion("METADATA_ID is not null");
            return (Criteria) this;
        }

        public Criteria andMetadataIdEqualTo(Long value) {
            addCriterion("METADATA_ID =", value, "metadataId");
            return (Criteria) this;
        }

        public Criteria andMetadataIdNotEqualTo(Long value) {
            addCriterion("METADATA_ID <>", value, "metadataId");
            return (Criteria) this;
        }

        public Criteria andMetadataIdGreaterThan(Long value) {
            addCriterion("METADATA_ID >", value, "metadataId");
            return (Criteria) this;
        }

        public Criteria andMetadataIdGreaterThanOrEqualTo(Long value) {
            addCriterion("METADATA_ID >=", value, "metadataId");
            return (Criteria) this;
        }

        public Criteria andMetadataIdLessThan(Long value) {
            addCriterion("METADATA_ID <", value, "metadataId");
            return (Criteria) this;
        }

        public Criteria andMetadataIdLessThanOrEqualTo(Long value) {
            addCriterion("METADATA_ID <=", value, "metadataId");
            return (Criteria) this;
        }

        public Criteria andMetadataIdIn(List<Long> values) {
            addCriterion("METADATA_ID in", values, "metadataId");
            return (Criteria) this;
        }

        public Criteria andMetadataIdNotIn(List<Long> values) {
            addCriterion("METADATA_ID not in", values, "metadataId");
            return (Criteria) this;
        }

        public Criteria andMetadataIdBetween(Long value1, Long value2) {
            addCriterion("METADATA_ID between", value1, value2, "metadataId");
            return (Criteria) this;
        }

        public Criteria andMetadataIdNotBetween(Long value1, Long value2) {
            addCriterion("METADATA_ID not between", value1, value2, "metadataId");
            return (Criteria) this;
        }

        public Criteria andTypesIsNull() {
            addCriterion("TYPES is null");
            return (Criteria) this;
        }

        public Criteria andTypesIsNotNull() {
            addCriterion("TYPES is not null");
            return (Criteria) this;
        }

        public Criteria andTypesEqualTo(Integer value) {
            addCriterion("TYPES =", value, "types");
            return (Criteria) this;
        }

        public Criteria andTypesNotEqualTo(Integer value) {
            addCriterion("TYPES <>", value, "types");
            return (Criteria) this;
        }

        public Criteria andTypesGreaterThan(Integer value) {
            addCriterion("TYPES >", value, "types");
            return (Criteria) this;
        }

        public Criteria andTypesGreaterThanOrEqualTo(Integer value) {
            addCriterion("TYPES >=", value, "types");
            return (Criteria) this;
        }

        public Criteria andTypesLessThan(Integer value) {
            addCriterion("TYPES <", value, "types");
            return (Criteria) this;
        }

        public Criteria andTypesLessThanOrEqualTo(Integer value) {
            addCriterion("TYPES <=", value, "types");
            return (Criteria) this;
        }

        public Criteria andTypesIn(List<Integer> values) {
            addCriterion("TYPES in", values, "types");
            return (Criteria) this;
        }

        public Criteria andTypesNotIn(List<Integer> values) {
            addCriterion("TYPES not in", values, "types");
            return (Criteria) this;
        }

        public Criteria andTypesBetween(Integer value1, Integer value2) {
            addCriterion("TYPES between", value1, value2, "types");
            return (Criteria) this;
        }

        public Criteria andTypesNotBetween(Integer value1, Integer value2) {
            addCriterion("TYPES not between", value1, value2, "types");
            return (Criteria) this;
        }
    }

    /**
     *  * t_sys_authority
     */
    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    /**
     * t_sys_authority null
     */
    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}